import Cookies from 'js-cookie'
const TokenKey = 'token'
// 获取token
export function getToken () {
  let user = Cookies.get(TokenKey)
  if (user) {
    user = JSON.parse(user)
  }
  return user
}

export function setToken (valueToken) {
  return Cookies.set(TokenKey,valueToken)
}

export function removeToken () {
  return Cookies.remove(TokenKey)
}

// const nameKey = 'jgs_name'

// // 获取name
// export function getName (valueName) {
//   return Cookies.get(valueName)
// }

// export function setName (valueName) {
//   return Cookies.set(nameKey,valueName)
// }

// export function removeName () {
//   return Cookies.remove()
// }